﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Idlesoft.Utils;

namespace Idlesoft.ShellAnywhereLanguage
{
	public interface IParam //: ITypeValue
	{
		#region props
		//Type Type { get; }
		//TypeValue TypeValue { get; }
		string Value { get; }
		int Length { get; }
		LexemeType LexemeType { get; }
		string Sig { get; }
		#endregion props

		#region methods
		bool Matches(string value);
		char CharAt(int dot);
		string Matched(int dot);
		string Unmatched(int dot);
		bool IsMatched(int dot);
		bool IsUnmatched(int dot);
		bool IsLast(int dot);
		bool IsAssociatedWith<TItem>(TItem item) where TItem : class, IParam;
		bool IsConstrainedBy<TItem>(TItem item) where TItem : class, IParam;
		#endregion methods

		#region events
		event Func<Type, bool> DoAssociatedWith;
		event Func<TypeValue, bool> DoConstrainedBy;
		#endregion events
	}
}
